var RecordDetailsWindow = Window.extend({
    _ccsFileName: club.res.RecordDetailsWindow_json,
    initWindow: function (recordInfo) {
        this._nodeList['wanFaName'].setString(ClubDataManager.getWanfaInfo2WanfaName(recordInfo));
        this._nodeList['roomId'].setString('房号:' + recordInfo['room_id']);
        this._nodeList['round'].setString('局数:' + recordInfo['round_current'] + '/' + recordInfo['round_total']);
        this._nodeList['playerCount'].setString('人数:' + recordInfo['players'].length);
        this._nodeList['createTime'].setString(timestamp2time(recordInfo['time_end'] / 1000));

        var players = recordInfo['players'] || [];
        var winners = recordInfo['winners'].split(',');
        var redColor = cc.color('#CD5F00');
        var greenColor = cc.color('#08AC07');
        for (var i = 0; i < 12; i++) {
            var playerInfo = players[i];
            this._nodeList['head' + i].setVisible((playerInfo != undefined));
            if (playerInfo) {
                loadImageToSprite(playerInfo['h'], this._nodeList['head' + i + '.head']);
                this._nodeList['head' + i + '.playerName'].setString(ellipsisStr(playerInfo['n'], ClubDataManager.NirckNameSize));
                this._nodeList['head' + i + '.playerId'].setString('Id:' + playerInfo['i']);
                this._nodeList['head' + i + '.playerScore'].setString(playerInfo['s']);
                if (playerInfo['s'] >= 0) {
                    this._nodeList['head' + i + '.playerScore'].setTextColor(redColor);
                } else {
                    this._nodeList['head' + i + '.playerScore'].setTextColor(greenColor);
                }
                this._nodeList['head' + i + '.icon_win'].setVisible((winners.indexOf(playerInfo['i'].toString()) >= 0));
            }
        }
    },
});